<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>菜单管理</title>
<script type="text/javascript"src="../static/jquery-easyui-1.5.5.3/jquery.min.js"></script>
<link rel="stylesheet"href="../static/jquery-easyui-1.5.5.3/themes/default/easyui.css" />
<link rel="stylesheet"href="../static/jquery-easyui-1.5.5.3/themes/icon.css" />
<script type="text/javascript"src="../static/jquery-easyui-1.5.5.3/jquery.easyui.min.js"></script>
<script type="text/javascript"src="../static/jquery-easyui-1.5.5.3/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript"src="../static/jquery-easyui-1.5.5.3/easyloader.js"></script>
<script type="text/javascript"src="../static/jquery-easyui-1.5.5.3/plugins/jquery.tree.js"></script>
<script type="text/javascript"src="../static/jquery-easyui-1.5.5.3/plugins/jquery.treegrid.js"></script>
</head>
<body>
<table id="tt"></table>
<script type="text/javascript">
	$('#tt').treegrid({
		title : '权限列表',
		width : '100%',
		url : 'treePage',
		idField : 'id',
		treeField : 'name',//树节点名称
		animate : true,//是否用动画效果
		singleSelect:true,
		iconCls: 'icon-edit',
		lines:true,
		collapsible : false,//是否可折叠 
		rownumbers : true,//行号 
		fitColumns : true,
		columns : [ 
			[ 
				{field : 'id',title : 'id',width : '2%'}, 
				{field : 'name',title : '名称',width : '18%'}, 
				{field : 'url',title : '地址',width : '20%'},
				{field : 'icon',title : '图标',width : '20%'}, 
				{field : 'role',title : '权限',width : '20%',
					 formatter: function (value) {
			                return value.name;
			            }
					},
				{field : 'idx1',title : '排序',width : '17%'}
				] 
			],
		 onLoadSuccess : function(data) {
			$('#tt').treegrid('expandAll');//全部展开树节点
		}
	});
</script>
</body>
</html>